package com.bupt.datacollect.controller;

import com.bupt.datacollect.data.Packet;
import com.bupt.datacollect.dto.PacketDTO;
import com.bupt.datacollect.service.PacketService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.List;


@RestController
public class PacketController {
    @Autowired
    private PacketService packetService;

    @RequestMapping("/packet/{meter_id}")
    public List<PacketDTO> list(@PathVariable int meter_id){
        return packetService.list(meter_id);
    }

}
